<!--#include file="AspCms_AdvFun.asp" -->
<%CheckAdmin("AspCms_AdvList.asp")%>
<!DOCTYPE html>
<html lang="zh-CN" style="min-height: 100%;">
<head>
<title>AdvEdit</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />

<link href="https://cdn.bootcss.com/uikit/3.0.0-beta.22/css/uikit.min.css" rel="stylesheet">
<link href="https://cdn.bootcss.com/jquery.perfect-scrollbar/0.7.0/css/perfect-scrollbar.min.css" rel="stylesheet">
<link href="../css/timoo/fancySelect.css" rel="stylesheet">
<link href="../css/timoo/jquery.datetimepicker.min.css" rel="stylesheet">
<link href="../css/timoo/timoo.css" rel="stylesheet">

<script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
<script src="../ueditor/ueditor.config.js"></script>
<script src="../ueditor/ueditor.all.min.js"> </script>
<script src="../ueditor/lang/zh-cn/zh-cn.js"></script>
<script src="https://cdn.bootcss.com/uikit/3.0.0-beta.22/js/uikit.min.js"></script>
<script src="https://cdn.bootcss.com/uikit/3.0.0-beta.22/js/uikit-icons.min.js"></script>
<script src="https://cdn.bootcss.com/jquery.perfect-scrollbar/0.7.0/js/perfect-scrollbar.jquery.min.js"></script>
<script src="../js/timoo/icheck.min.js"></script>
<script src="../js/timoo/fancySelect.js"></script>
<script src="../js/timoo/jquery.datetimepicker.full.min.js"></script>
<script src="../js/timoo/timoo.js"></script>
</head>
<body>
<div class="tm-right">
    <div class="main">
        <div class="section setting-company">
            <div class="layout">
                <div class="title">修改广告</div>
                <div class="content">
                    <form action="" method=post>
                        <div class="tm-transition list">
                            <div class="uk-clearfix tm-transition subject">
                                <span class="uk-float-left">广告名称</span>
                            </div>
                            <div class="input">
                                <input type="text" maxLength="200" name="advname" value="<%=AdvArray(1,0)%>">
                                <input type="hidden" name="id" id="id" value="<%=AdvArray(0,0)%>">
                            </div>
                        </div>
                        <div class="tm-transition radio table-select list">
                            <div class="uk-clearfix tm-transition subject">
                                <span class="uk-float-left">广告类型</span>
                                <i class="tm-transition icon" uk-icon="icon: info" uk-tooltip="pos: right" title="选择广告类型，请在模板中预留该广告的位置并调用相应标签。"></i>
                            </div>
                            <div id="Type" class="uk-clearfix input">
                                <li class="uk-clearfix uk-float-left input-select transverse-select">
                                    <select class="tm-select" name="advclass" id="advclass" onChange="ShowBar(this.value)" disabled>
                                        <option value="1" <%if AdvArray(2,0)=1 then%> selected<%end if%>>文本</option>
                                        <option value="2" <%if AdvArray(2,0)=2 then%> selected<%end if%>>图片</option>
                                        <option value="3" <%if AdvArray(2,0)=3 then%> selected<%end if%>>代码</option>
                                    </select>
                                    <input name="advclass" type="hidden" value="<%=AdvArray(2,0)%>">
                                </li>
                            </div>
                        </div>
                        <div id="AD-Link" class="tm-transition list <%if AdvArray(2,0)=3 or AdvArray(2,0)=6 then%>tm-display-none<%end if%>">
                            <div class="uk-clearfix tm-transition subject">
                                <span class="uk-float-left">链接地址</span>
                                <i class="tm-transition icon" uk-icon="icon: info" uk-tooltip="pos: right" title="该广告的链接地址。"></i>
                            </div>
                            <div class="input">
                                <input type="text" name="LinkPath" id="LinkPath" value="<%=fLinkPath%>">
                            </div>
                        </div>
                        <div class="tm-transition list ad-picture <%if AdvArray(2,0)=1 or AdvArray(2,0)=3 or AdvArray(2,0)=6 then%>tm-display-none<%end if%>">
                            <div class="uk-clearfix tm-transition subject">
                                <span class="uk-float-left">图片地址</span>
                            </div>
                            <div class="input">
                                <input type="text" name="ImagePath" id="ImagePath" value="<%=fImagePath%> ">
                            </div>
                        </div>
                        <div class="tm-transition list upload picture-upload ad-picture <%if AdvArray(2,0)=1 or AdvArray(2,0)=3 or AdvArray(2,0)=6 then%>tm-display-none<%end if%>">
                            <div class="uk-clearfix tm-transition subject">
                                <span class="uk-float-left">上传图片</span>
                            </div>
                            <div class="input">
                                <iframe src="../editor/upload.asp?sortType=14&stype=file&amp;Tobj=ImagePath" scrolling="no" topmargin="0" height="40" width="100%" marginwidth="0" marginheight="0" frameborder="0"></iframe>
                            </div>
                        </div>
                        <div class="tm-display-none tm-transition list have ad-picture-right">
                            <div class="uk-clearfix tm-transition subject">
                                <span class="uk-float-left">右侧图片地址</span>
                            </div>
                            <div class="input">
                                <input type="text" name="ImagePathr" id="ImagePathr" value="<%=fImagePathr%> ">
                            </div>
                        </div>
                        <div class="tm-display-none tm-transition list upload picture-upload ad-picture-right">
                            <div class="uk-clearfix tm-transition subject">
                                <span class="uk-float-left">上传右侧图片</span>
                            </div>
                            <div class="input">
                                <iframe src="../editor/upload.asp?sortType=14&stype=file&amp;Tobj=ImagePathr" scrolling="no" topmargin="0" height="40" width="100%" marginwidth="0" marginheight="0" frameborder="0"></iframe>
                            </div>
                        </div>
                        <div class="tm-display-none tm-transition list ad-picture-right">
                            <div class="uk-clearfix tm-transition subject">
                                <span class="uk-float-left">右侧图片链接地址</span>
                                <i class="tm-transition icon" uk-icon="icon: info" uk-tooltip="pos: right" title="该广告的链接地址。"></i>
                            </div>
                            <div class="input">
                                <input type="text" name="LinkPathr" id="LinkPathr" value="<%=fLinkPathr%>">
                            </div>
                        </div>
                        <div class="tm-transition list ad-picture <%if AdvArray(2,0)=1 or AdvArray(2,0)=3 or AdvArray(2,0)=6 then%>tm-display-none<%end if%>">
                            <div class="uk-clearfix tm-transition subject">
                                <span class="uk-float-left">图片宽度</span>
                                <i class="tm-transition icon" uk-icon="icon: info" uk-tooltip="pos: right" title="请输入 数值 + 单位。（单位为 px 或 %； 例：1920px 或者 100%）"></i>
                            </div>
                            <div class="input">
                                <input type="text" name="imgw" value="<%=AdvArray(5,0)%>">
                            </div>
                        </div>
                        <div class="tm-transition list ad-picture <%if AdvArray(2,0)=1 or AdvArray(2,0)=3 or AdvArray(2,0)=6 then%>tm-display-none<%end if%>">
                            <div class="uk-clearfix tm-transition subject">
                                <span class="uk-float-left">图片高度</span>
                                <i class="tm-transition icon" uk-icon="icon: info" uk-tooltip="pos: right" title="请输入 数值 + 单位。（单位为 px 或 %； 例：1920px 或者 100%）"></i>
                            </div>
                            <div class="input">
                                <input type="text" name="imgh" value="<%=AdvArray(6,0)%>">
                            </div>
                        </div>
                        <div class="tm-transition list">
                            <div class="uk-clearfix tm-transition subject">
                                <span class="uk-float-left">投放时间</span>
                                <i class="tm-transition icon" uk-icon="icon: info" uk-tooltip="pos: right" title="该广告开始投放的时间。"></i>
                            </div>
                            <div class="input">
                                <input id="Start-Time" type="text" maxlength="200" name="stime" value="<%=FormatDate(AdvArray(7,0), "yy-m-d h:mi:s")%>">
                            </div>
                        </div>
                        <div class="tm-transition list">
                            <div class="uk-clearfix tm-transition subject">
                                <span class="uk-float-left">结束时间</span>
                                <i class="tm-transition icon" uk-icon="icon: info" uk-tooltip="pos: right" title="该广告结束投放的时间。"></i>
                            </div>
                            <div class="input">
                                <input id="End-Time" type="text" maxlength="200" name="etime" value="<%=FormatDate(AdvArray(8,0), "yy-m-d h:mi:s")%>">
                            </div>
                        </div>
                        <div class="tm-transition radio list">
                            <div class="uk-clearfix tm-transition subject">
                                <span class="uk-float-left">是否启用</span>
                                <i class="tm-transition icon" uk-icon="icon: info" uk-tooltip="pos: right" title="选择启用或者禁用该广告。"></i>
                            </div>
                            <div class="uk-clearfix input">
                                <label for="Adv-Open" class="uk-clearfix uk-float-left tm-transition">
                                    <span class="uk-float-left check">
                                        <i class="tm-transition icon" uk-icon="icon: check"></i>
                                    </span>
                                    <span class="uk-float-left">启用</span>
                                    <input id="Adv-Open" type="radio" name="AdvStatus" value="1" <%if AdvArray(9,0)=1 then%>checked<%end if%>>
                                </label>
                                <label for="Adv-Close" class="uk-clearfix uk-float-left tm-transition">
                                    <span class="uk-float-left check">
                                        <i class="tm-transition icon" uk-icon="icon: check"></i>
                                    </span>
                                    <span class="uk-float-left">禁用</span>
                                    <input id="Adv-Close" type="radio" name="AdvStatus" value="0" <%if AdvArray(9,0)<>1 then%>checked<%end if%>>
                                </label>
                            </div>
                        </div>
                        <div class="tm-transition textarea list">
                            <div class="uk-clearfix tm-transition subject">
                                <span class="uk-float-left">广告内容</span>
                                <i class="tm-transition icon" uk-icon="icon: info" uk-tooltip="pos: right" title="文字或代码广告的内容。"></i>
                            </div>
                            <div class="input">
                                <textarea type="text" name="advcontent"><%=decodeHtml(AdvArray(10,0))%></textarea>
                            </div>
                        </div>
                        <div class="uk-clearfix tm-transition list submit">
                            <div class="uk-float-left input">
                                <input type="submit" value="修改" onClick="form.action='?action=editsave';">
                            </div>
                            <div class="uk-float-left input">
                                <input type="button" value="返回" onClick="history.go(-1)"> 
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
function tm_type_select(){
        
    var Type = jQuery('#Type');
    
    Type.on('DOMNodeInserted', '.trigger', function(){
        
        //获取选中的分类类型
        var Text = jQuery(this).text();
        
        //判断分类类型
        if( Text === '图片' ){
            
            jQuery('.ad-picture').removeClass('tm-display-none');
            
        } else {
            
            jQuery('.ad-picture').addClass('tm-display-none');
            
        }
        
        if( Text === '代码' ){
            
            jQuery('#AD-Link').addClass('tm-display-none');
            
        } else {
            
            jQuery('#AD-Link').removeClass('tm-display-none');
            
        }
    
    })

}

tm_type_select();
    
jQuery.datetimepicker.setLocale('zh');
    
jQuery('#Start-Time, #End-Time').datetimepicker({
        
    format: 'Y-m-d H:i:s',
    timepicker: true,
    step: 1,
        
});
</script>
</body>
</html>